package com.baomidou.crab;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.boot.Banner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.ComponentScan;

import com.baomidou.crab.common.spring.SpringHelper;
import com.baomidou.crab.core.annotations.EnableAlipay;

/**
 * <p>
 * Spring Boot Start
 * </p>
 *
 * @author jobob
 * @since 2018-09-23
 */
@EnableAlipay
@SpringBootApplication
@ComponentScan(basePackages = {
        "com.baomidou.crab.config",
        "com.baomidou.crab.*.controller",
        "com.baomidou.crab.*.service"})
public class SystemApplication {

    private static final Logger logger = LoggerFactory.getLogger(SystemApplication.class);

    public static void main(String[] args) {
        SpringApplication application = new SpringApplication(SystemApplication.class);
        application.setBannerMode(Banner.Mode.CONSOLE);
        SpringHelper.setApplicationContext(application.run(args));
        if (logger.isInfoEnabled()) {
            System.out.println("入口：http://localhost:8088");
            System.out.println("文档：http://localhost:8088/swagger-ui.html");
        }
    }
}
